package day11;

import lombok.Data;

/**
 * @Author juzipi
 * @Date 2021/6/27 15:41
 * @Info
 */
@Data
public class Mankind {

    //性别
    private int sex;
    //薪资
    private int salary;

    public void manOrWoman(){
        if (sex == 1){
            System.out.println("男");
        }else {
            System.out.println("女");
        }
    }


    public void employed(){
        System.out.println(salary == 0 ? "没工作" : "有工作");
    }

}
